package com.hd.zx.qt.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.sql.DataSource;
import java.sql.SQLException;

/**
 * <h3>partitionjob</h3>
 * <p>HelloWordController </p>
 *
 * @author : hduong
 * @version : 1.0
 * @date : 2020-09-09 11:18
 **/@RestController
public class HelloWordController {

     @Autowired
    private DataSource dataSource;

     @RequestMapping("/index")
     public String index() throws SQLException {
         System.out.println(dataSource.getConnection());
         System.out.println(dataSource);
         return "Hello Spring Boot!";
     }

}
